'use strict';
/**
 * @name 账户基金账户页面Controller
 * @author zyf
 */
angular.module('metalabPartnerApp')
    .controller('PasswordCtrl', ['$scope', '$stateParams', '$state', 'MetaResources', 'MetaRemind','MetaSEO',
        function ($scope, $stateParams, $state, MetaResources, MetaRemind,MetaSEO) {
            MetaSEO.setSEO('账户基金','迈科技账户基金','迈科技,迈科技账户,迈坦基合伙基金,账户基金');
            $scope.submitForm = function (valid) {
                if (valid) {
                    MetaResources.user.updatePassword({
                        userId: '_self'
                    }, $scope.formData, function () {
                        MetaRemind.success('修改成功');
                    }, function (error) {
                        MetaRemind.error(error);
                    });
                } else {
                    $scope.clicked = true;
                    MetaRemind.error('请按要求填写表单');
                }
            }
        }]);

